<?php

namespace App\Http\Requests;

class Login extends Base
{

    public function rules()
    {
        $rules = [
            //unique:表名,字段名,排除ID,主键字段,条件字段,条件,
            'mobile'   => 'required',
            'password' => 'sometimes|min:6',
        ];
        return $rules;

    }

    public function messages()
    {
        return [
            'mobile.required'   => '请填写手机号',
            'password.min'      => '密码不能低于6位数',
        ];
    }
}
